package com.example.demo.data;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by ltian on 2020/1/17.
 */
@Component
@Data
@ConfigurationProperties(prefix = "sx")
public class SxConfig {
    private String boutlist;
    private String boutlistDetail;
    private String pallroutecomb;
    private String basicInfoHex;

    private String date1;
    private String date2;
    private int job;
    private boolean readonly;


    public boolean isETC() {
        return getBoutlist().toUpperCase().startsWith("ETC");
    }

    public int getDataType() {
        if (job == 1) {
            return 25;
        }
        if (isETC()) {
            return 1;
        }
        return 6;
    }


}
